///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#ifndef __RENDERSYSTEMCAPABILITIESMANAGER_H__
#define __RENDERSYSTEMCAPABILITIESMANAGER_H__

#include "OgrePrerequisites.h"
#include "OgreSingleton.h"
#include "OgreStringVector.h"

#include "OgreRenderSystemCapabilities.h"



namespace Ogre {


	
	
	
    class _OgreExport RenderSystemCapabilitiesManager :  public Singleton<RenderSystemCapabilitiesManager>, public MemAlloc_RenderSys
    {

    public:

        
        RenderSystemCapabilitiesManager();

        
        virtual ~RenderSystemCapabilitiesManager();


        
        void parseCapabilitiesFromArchive(const String& filename, const String& archiveType, bool recursive = true);
		
		
        RenderSystemCapabilities* loadParsedCapabilities(const String& name);

		
		const map<String, RenderSystemCapabilities*>::type &getCapabilities() const;

        
        void _addRenderSystemCapabilities(const String& name, RenderSystemCapabilities* caps);

        
        static RenderSystemCapabilitiesManager& getSingleton(void);
        
        static RenderSystemCapabilitiesManager* getSingletonPtr(void);

    protected:

        RenderSystemCapabilitiesSerializer* mSerializer;

        typedef map<String, RenderSystemCapabilities*>::type CapabilitiesMap;
        CapabilitiesMap mCapabilitiesMap;

        const String mScriptPattern;

    };

	
	
}

#endif
